package leetcode.test;

import java.util.Stack;

public class CQueue {
    Stack<Integer> sa = new Stack<>();
    Stack<Integer> sb = new Stack<>();

    public CQueue() {

    }

    public void appendTail(int value) {
        sa.add(value);
    }

    public int deleteHead() {
        while (!sa.empty()){
            sb.add(sa.pop());
        }
        int rt = sb.empty() ? -1 : sb.pop();
       while (!sb.empty()){
           sa.add(sb.pop());
       }
        return rt;
    }
}